(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

minus(0, y) → 0
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0
mod(x, 0) → 0
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0, y) → false
gt(s(x), 0) → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0) → false
lt(0, s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
minus(s(x), 0) →+ s(minus(x, 0))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x / s(x)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

S is empty.
Rewrite Strategy: FULL

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
minus, gt, mod, lt

They will be analysed ascendingly in the following order:
gt < minus
minus < mod
lt < mod

(8) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
gt, minus, mod, lt

They will be analysed ascendingly in the following order:
gt < minus
minus < mod
lt < mod

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Induction Base:
gt(gen_0':s3_0(0), gen_0':s3_0(0)) →RΩ(1)
false

Induction Step:
gt(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) →RΩ(1)
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) →IH
false

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
minus, mod, lt

They will be analysed ascendingly in the following order:
minus < mod
lt < mod

(12) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol minus.

(13) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
lt, mod

They will be analysed ascendingly in the following order:
lt < mod

(14) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
lt(gen_0':s3_0(n383_0), gen_0':s3_0(n383_0)) → false, rt ∈ Ω(1 + n3830)

Induction Base:
lt(gen_0':s3_0(0), gen_0':s3_0(0)) →RΩ(1)
false

Induction Step:
lt(gen_0':s3_0(+(n383_0, 1)), gen_0':s3_0(+(n383_0, 1))) →RΩ(1)
lt(gen_0':s3_0(n383_0), gen_0':s3_0(n383_0)) →IH
false

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(15) Complex Obligation (BEST)

(16) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
lt(gen_0':s3_0(n383_0), gen_0':s3_0(n383_0)) → false, rt ∈ Ω(1 + n3830)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

The following defined symbols remain to be analysed:
mod

(17) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol mod.

(18) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
lt(gen_0':s3_0(n383_0), gen_0':s3_0(n383_0)) → false, rt ∈ Ω(1 + n3830)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(19) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(20) BOUNDS(n^1, INF)

(21) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)
lt(gen_0':s3_0(n383_0), gen_0':s3_0(n383_0)) → false, rt ∈ Ω(1 + n3830)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(22) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(23) BOUNDS(n^1, INF)

(24) Obligation:

TRS:
Rules:
minus(0', y) → 0'
minus(s(x), y) → if(gt(s(x), y), x, y)
if(true, x, y) → s(minus(x, y))
if(false, x, y) → 0'
mod(x, 0') → 0'
mod(x, s(y)) → if1(lt(x, s(y)), x, s(y))
if1(true, x, y) → x
if1(false, x, y) → mod(minus(x, y), y)
gt(0', y) → false
gt(s(x), 0') → true
gt(s(x), s(y)) → gt(x, y)
lt(x, 0') → false
lt(0', s(x)) → true
lt(s(x), s(y)) → lt(x, y)

Types:
minus :: 0':s → 0':s → 0':s
0' :: 0':s
s :: 0':s → 0':s
if :: true:false → 0':s → 0':s → 0':s
gt :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
mod :: 0':s → 0':s → 0':s
if1 :: true:false → 0':s → 0':s → 0':s
lt :: 0':s → 0':s → true:false
hole_0':s1_0 :: 0':s
hole_true:false2_0 :: true:false
gen_0':s3_0 :: Nat → 0':s

Lemmas:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

Generator Equations:
gen_0':s3_0(0) ⇔ 0'
gen_0':s3_0(+(x, 1)) ⇔ s(gen_0':s3_0(x))

No more defined symbols left to analyse.

(25) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
gt(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) → false, rt ∈ Ω(1 + n50)

(26) BOUNDS(n^1, INF)